package de.fhaugsburg.games.boardgames.tests;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import de.fhaugsburg.games.boardgames.CircularList;
import de.fhaugsburg.games.boardgames.scrabble.ScrabblePlayer;

public class CircularListTest {
	
	private CircularList<ScrabblePlayer> list;
	private ScrabblePlayer player1;
	private ScrabblePlayer player2;
	private ScrabblePlayer player3;

	@Before
	public void setUp() throws Exception {
		list = new CircularList<ScrabblePlayer>();
		player1 = new ScrabblePlayer("chris");
		player2 = new ScrabblePlayer("hans");
		player3 = new ScrabblePlayer("andi");
		list.add(player1);
		list.add(player2);
		list.add(player3);
	}

	@Test
	public void testNext() {
		assertEquals(player2, list.next());
	}


	@Test
	public void testPrev() {
		assertEquals(player3, list.prev());
	}

}
